/*
 * Copyright (C) 2014 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

// customizations to vendored mediaelementplayer css

/* make subtitle text bigger when it's in fullscreen */
.mejs-container-fullscreen .mejs-captions-layer {
  @include fontSize($ic-font-size--xlarge);
}

/* good menu widths */
.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector {
  width: 160px;

  label {
    width: 160px !important;
  }
}

.mejs-controls .mejs-captions-button .mejs-captions-selector {
  width: 105px;

  label {
    width: 70px !important;
  }
}

/* Subtitile upload link */
.mejs-captions-selector .upload-track {
  color: white;
  margin: 3px 0 5px 5px;
  float: left;
}

/* style for taking care of the weird outline of focus on audio comments.
 * see CNVS-22375 for reference.
 * this should ultimate be fixed in the mediaelement repo, but simon is
 * currently making big changes to that. once he's done, we should fix this
 * issue there with 'outline' style instead of this clever hack
 */
.mejs-audio:focus .mejs-inner:before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  outline: 5px auto rgb(59,153,252);
  outline-offset: 1px;
  content: ' ';
}

/* style menu items without a radio button */
.mejs-captions-selector, .mejs-speed-selector, .mejs-sourcechooser-selector {
  padding: 0 !important;

  /* compensate for above 0 padding */
  ul li {
    padding: 0 10px !important;
  }

  /* add a hover effect */
  ul li:hover {
    background-color: rgb(200, 200, 200) !important;
    background-color: rgba(255,255,255,.4) !important;
  }

  /* Hide radio button inputs */
  ul li input {
    border: 0;
    clip: rect(0 0 0 0);
    position: absolute;
    overflow: hidden;
    margin: -1px;
    padding: 0;
    width: 1px;
    height: 1px;
  }

  ul li label {
    margin-left: 5px;
    cursor: pointer;
  }

  ul li label.mejs-selected {
    color: rgba(33, 248, 248, 1) !important;
  }
}
